package com.chinasofti.admin.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.chinasofti.manager.service.AdminAttenceService;
import com.chinasofti.model.EmpAttence;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import java.util.List;

/**
 * Creator: <br>
 * Date: <br>
 * Description: <br>
 */
@Controller
@RequestMapping("/admin/attence")
public class AdminAttenceController {
    @Reference
    private AdminAttenceService adminAttenceService;

    @GetMapping("/list")
    public ModelAndView list(){
        ModelAndView mv = new ModelAndView("attence/list");
        List<EmpAttence> attences = adminAttenceService.queryAttenceList();
        mv.addObject("attences", attences);
        return mv;
    }

}
